<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:if test="${not empty pagination}">
	<div class="text-center">
	<ul class="pagination margin-auto">
		<c:choose>
			<c:when test="${not empty pagination.prevUrl}">
				  <li><a href="${pagination.prevUrl }">&laquo;</a></li>
			</c:when>
			<c:otherwise>
				 <li class="disabled"><span>&laquo;</span></li>
			</c:otherwise>
		</c:choose>
		<c:forEach items="${pagination.pageNumbers}" var="page" varStatus="status">
			<c:choose>
				<c:when test="${page eq '...'}">
					<li class="disabled"><a href="#">${page}</a></li>
				</c:when>
				<c:when test="${page eq pagination.currentPage}">
					<li class="active"><a href="javascript:void(0)">${page}</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="${pagination.baseUrl}${page}">${page}</a></li>
				</c:otherwise>
			</c:choose>
		</c:forEach>
		<c:choose>
			<c:when test="${not empty pagination.nextUrl}">
				  <li><a href="${pagination.nextUrl }">&raquo;</a></li>
			</c:when>
			<c:otherwise>
				  <li class="disabled"><span>&raquo;</span></li>
			</c:otherwise>
		</c:choose>
	</ul>
	</div>
</c:if>